<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
    <title>发布信息管理</title>
    <link rel="stylesheet" type="text/css" href="css/themes/default/easyui.css">
    <link rel="stylesheet" type="text/css" href="css/themes/icon.css">
    <link rel="stylesheet" type="text/css" href="css/themes/color.css">
    <link rel="stylesheet" type="text/css" href="css/demo/demo.css">
    <script type="text/javascript" src="js/jquery.min.js"></script>
    <script type="text/javascript" src="js/jquery.easyui.min.js"></script>
</head>
<body>
 <div id="toolbar-informmanage">
 <a href="javascript:void(0)" class="easyui-linkbutton c6" iconCls="icon-add" plain="true" onclick="informmanageAdd()">添加</a>
  <a href="javascript:void(0)" class="easyui-linkbutton c6" iconCls="icon-edit" plain="true" onclick="informmanageEdit()">修改</a>
 <a href="javascript:void(0)" class="easyui-linkbutton c6" iconCls="icon-remove" plain="true" onclick="informmanageDelete()">删除</a>
    </div>
    <table id="informmanage-table" title="当前位置：公共信息管理\发布信息管理" class="easyui-datagrid" style="width:auto;height:250px" toolbar="#toolbar-informmanage" rownumbers="true" fitColumns="true" singleSelect="true">
        <thead>
            <tr>
             <th data-options="field:'informmanageck',checkbox:true" width="5%" align="center"></th>
                <th field="bt" width="10%" align="center">信息标题</th>
                <th field="xxnr" width="30%" align="center">信息内容</th>
                <th field="date" width="10%" align="center">发布时间</th>
                <th field="fbr" width="10%" align="center">发布人</th>
                <th field="fbbm" width="10%" align="center">发布部门</th>
            </tr>
        </thead>
        <tbody>
            <tr>
                <td></td>
                <td>开会时间</td>
                <td>下午一点准时开会</td>
                <td>2017-11-23</td>
                <td>张三</td>
                <td>人事部</td>
            </tr>
        </tbody>
    </table>
   
    
    <div id="dlg-informmanageAdd" class="easyui-dialog" style="width:400px;height:400px;padding:10px 20px"
            closed="true" buttons="#dlg-informmanageAdd-btn">
        <form id="fm-informmanageAdd" method="post" novalidate>
            <div class="fitem">
                <label>信息标题:</label>
                <input name="bt" class="easyui-textbox" required>&nbsp;&nbsp;
            </div>
            <div class="fitem">
                <label>信息内容:</label>
                <input name="xxnr" class="easyui-textbox" required>&nbsp;&nbsp;
            </div>
            <div class="fitem">
                <label>发布时间:</label>
                <input name="date" class="easyui-textbox" required>&nbsp;&nbsp;
            </div>
            <div class="fitem">
                <label>发布人:</label>
                <input name="fbr" class="easyui-textbox" required>&nbsp;&nbsp;
            </div>
            <div class="fitem">
                <label>发布部门:</label>
                <input name="fbbm" class="easyui-textbox" required>&nbsp;&nbsp;
            </div>
        </form>
    </div>
    <div id="dlg-informmanageAdd-btn">
        <a href="javascript:void(0)" class="easyui-linkbutton c6" iconCls="icon-ok" onclick="()" style="width:90px">确定</a>
        <a href="javascript:void(0)" class="easyui-linkbutton" iconCls="icon-cancel" onclick="javascript:$('#dlg-informmanageAdd').dialog('close')" style="width:90px">取消</a>
    </div>
    
     <div id="dlg-informmanageEdit" class="easyui-dialog" style="width:400px;height:300px;padding:10px 20px"
            closed="true" buttons="#dlg-informmanageEdit-btn">
        <form id="fm-informmanageEdit" method="post" novalidate>
           <div class="fitem">
                <label>信息标题:</label>
                <input name="bt" class="easyui-textbox" required>&nbsp;&nbsp;
            </div>
            <div class="fitem">
                <label>信息内容:</label>
                <input name="xxnr" class="easyui-textbox" required>&nbsp;&nbsp;
            </div>
            <div class="fitem">
                <label>发布时间:</label>
                <input name="date" class="easyui-textbox" required>&nbsp;&nbsp;
            </div>
            <div class="fitem">
                <label>发布人:</label>
                <input name="fbr" class="easyui-textbox" required>&nbsp;&nbsp;
            </div>
            <div class="fitem">
                <label>发布部门:</label>
                <input name="fbbm" class="easyui-textbox" required>&nbsp;&nbsp;
            </div>
        </form>
    </div>
    <div id="dlg-informmanageEdit-btn">
        <a href="javascript:void(0)" class="easyui-linkbutton c6" iconCls="icon-ok" onclick="()" style="width:90px">确定</a>
        <a href="javascript:void(0)" class="easyui-linkbutton" iconCls="icon-cancel" onclick="javascript:$('#dlg-informmanageEdit').dialog('close')" style="width:90px">取消</a>
    </div>
    
    
  
    
    <script type="text/javascript">
        var url;
        function informmanageAdd(){
            $('#dlg-informmanageAdd').dialog('open').dialog('center').dialog('setTitle','发布信息');
            $('#fm-informmanageAdd').form('clear');
        }
		function informmanageEdit(){
			var row = $('#informmanageEdit-table').datagrid('getSelected');
            if (row){
                $('#dlg-informmanageEdit').dialog('open').dialog('center').dialog('setTitle','修改信息');
                $('#fm-informmanageEdit').form('load',row);
            }
        }
		function informmanageDelete(){
            var row = $('#informmanage-table').datagrid('getSelected');
            if (row){
                $.messager.confirm('删除信息','是否删除该信息',function(r){
                    if (r){
                        $.post('destroy_user.php',{id:row.id},function(result){
                            if (result.success){
                                $('#informmanage-table').datagrid('reload');    // reload the user data
                            } else {
                                $.messager.show({    // show error message
                                    title: 'Error',
                                    msg: result.errorMsg
                                });
                            }
                        },'json');
                    }
                });
            }
        }

    </script>
    <style type="text/css">
        #fm{
            margin:0;
            padding:10px 30px;
        }
        .ftitle{
            font-size:14px;
            font-weight:bold;
            padding:5px 0;
            margin-bottom:10px;
            border-bottom:1px solid #ccc;
        }
        .fitem{
            margin-bottom:5px;
        }
        .fitem label{
            display:inline-block;
            width:80px;
        }
        .fitem input{
            width:160px;
        }
    </style>
</body>
</html>